@extends('admin.admin')

@section('content')
        <!-- Content Header (Page header) -->
<section class="content-header">
    <h1>
        用户管理
        <small>用户列表</small>
    </h1>
    <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> 控制面板</a></li>
        <li ><a href="#">用户管理</a></li>
        <li ><a href="/admin/admin_role">用户列表</a></li>
    </ol>
</section>

<!-- Main content -->
<section class="content">

    <div class="row">
        <div class="col-xs-12">
            <div class="box box-primary">
                <div class="box-header with-border">
                    <h3 class="box-title">用户修改</h3>
                    <div class="box-tools">
                        <a href="{{Route('admin.user.index')}}" type="button" class="btn btn-block btn-success btn-xs"><i class="icon  glyphicon glyphicon glyphicon-menu-left"></i> 返回</a>
                    </div>
                </div>
                <!-- /.box-header -->
                <!-- form start -->
                {!! Form::model($users,['route'=>['admin.user.update',$users->id],'method'=>'put'])  !!}
                {!! Form::hidden('back_url',@$_SERVER['HTTP_REFERER']) !!}
                    <div class="box-body">
                        <div class="form-group @if($errors->has('user_name')) has-error   @endif">
                            <label for="exampleInputEmail1">用户名</label>
                            {!! Form::text('user_name',old('user_name'),array('class'=>'form-control','placeholder'=>'用户名称','disabled'=>'disabled'))!!}
                            @if($errors->has('user_name'))
                                <label class="control-label" for="inputError"><i class="fa fa-times-circle-o"></i> {{$errors->first('user_name')}}</label>
                            @endif
                        </div>
                        <div class="form-group @if($errors->has('phone')) has-error   @endif">
                            <label for="exampleInputPassword1">手机号</label>
                            {!! Form::text('phone',old('phone'),array('class'=>'form-control','placeholder'=>'请填写用户手机号'))!!}
                            @if($errors->has('phone'))
                                <label class="control-label" for="inputError"><i class="fa fa-times-circle-o"></i> {{$errors->first('phone')}}</label>
                            @endif
                        </div>
                        <div class="form-group @if($errors->has('email')) has-error   @endif">
                            <label for="exampleInputPassword1">邮箱</label>
                            {!! Form::text('email',old('email'),array('class'=>'form-control','placeholder'=>'请填写用户邮箱'))!!}
                            @if($errors->has('email'))
                                <label class="control-label" for="inputError"><i class="fa fa-times-circle-o"></i> {{$errors->first('email')}}</label>
                            @endif
                        </div>
                        <div class="form-group @if($errors->has('is_disabled')) has-error   @endif">
                            <label for="exampleInputPassword1">用户状态</label>
                            {!! Form::select('is_disabled',['0'=>'不封禁','1'=>'封禁'],old('is_disabled'),['class'=>'form-control'])!!}
                            @if($errors->has('is_disabled'))
                                <label class="control-label" for="inputError"><i class="fa fa-times-circle-o"></i> {{$errors->first('is_disabled')}}</label>
                            @endif
                        </div>
                        <div class="form-group @if($errors->has('point')) has-error   @endif">
                            <label for="exampleInputPassword1">积分</label>
                            {!! Form::text('point',old('point'),array('class'=>'form-control','placeholder'=>'积分'))!!}
                            @if($errors->has('point'))
                                <label class="control-label" for="inputError"><i class="fa fa-times-circle-o"></i> {{$errors->first('point')}}</label>
                            @endif
                        </div>

                    </div>
                    <div class="box-footer">
                        <button type="submit" class="btn btn-primary">保存</button>
                    </div>
                {!! Form::close()  !!}
            </div>
            <!-- /.box -->
        </div>
    </div>



</section>
<!-- /.content -->
@endsection